Gets or sets a description of the error
__property BSTR Description;
String Description;
Property Description() As String
The Description property is equivalent to the GetDescription method of IErrorInfo (calling GetDescription on an IErrorInfo pointer to an ADError object will return the Description value).
When setting the Description, the string may include substitution tokens in the form %n, when n is an integer index for the token. When the description is retrieved, the substitution tokens will be replaced by the substitution values added to the error using the AddInsert and AddVariantInsert methods. Replacement values must be added in the order corresponding to their token indexes. That is, token %1 is replaced by the first value added using one of the Add methods, token %2 is replaced by the second, etc.
The following example illustrates this.
Dim error As New ADError error.Description = "The value for '%1' is not valid: '%2' is too large." error.AddInsert "Control A" error.AddVariantInsert 325
When the Description property is queried it will return
The value for 'Control A' is not valid: '325' is too large.
adTempus API Reference version 3.0.0.0, revised 10/30/2008
|